There has been known a technique for detecting and eliminating a partial image corresponding to, for example, a hole (e.g., a perforation or a punched hole) formed in a document using a hole punch from an image of the document read by an image reader.
In one example, a known image processing apparatus identifies a punched-hole image by an outline tracing procedure. In the outline tracing procedure, an outline vector is determined every pixel, and thus outline data is obtained. Then, based on the obtained outline data, an image inside the outline is determined as a candidate image of a punched hole. Thereafter, through a pattern matching of the determined candidate image with standard geometry parameters of punched holes, it is determined whether the candidate image corresponds to a punched hole.
When the candidate image shows a completely black dot, through the pattern matching of the candidate image with the standard geometry parameters, it is determined whether the candidate image and a delete image of a punched hole are substantially of the same configuration. When the candidate image has a white region included in the outline, only an outermost outline of the candidate image is compared with the standard geometry parameters to determine whether the candidate image and the delete image are substantially of the same configuration.
When the candidate image has only part of a circular outline, in order to determine whether the candidate image corresponds to a punched hole, an outline of the candidate image is vectorised into a set of outline vectors. Based on the directions of the vectors, a center point is obtained. A distance between an outermost outline of the candidate image and the center point is calculated as a radius of a circle. Based on the calculated radius, a configuration of the candidate image is restored. Then, through the pattern matching, it is determined whether the candidate image after its configuration is restored corresponds to a punched hole.
In another example, a known image reader obtains an image density of a reference image by reading a white reference member and obtains an image density of a document image by reading a document. The image density of the reference image is higher than the image density of a blank portion (having a color of white) of the document image. In a case that the document has a punched hole, an image density of an outline of the punched hole is lower than the image density of the blank portion. The image reader detects a circle having a lower image density than the image density of the blank portion in the document image. Thereafter, the image reader determines whether an image density of an image enclosed by the detected circle is equal to the image density of the reference image. When the image density of the image enclosed by the circle is equal to the image density of the reference image, the image reader determines that the document has a punched hole.